//
//  DrawView.m
//  project
//
//  Created by 黄建华 on 2019/1/9.
//  Copyright © 2019年 黄建华. All rights reserved.
//

#import "DrawView.h"

@implementation DrawView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView
{
    UIView *line = [[UIView alloc] initWithFrame:SNFRAME(2, 0, 2, self.height)];
    line.backgroundColor = [UIColor blackColor];
    line.alpha = 0.7;
    [self addSubview:line];
    
    UIView *dog = [[UIView alloc] initWithFrame:SNFRAME(-1, self.height -4, 8, 8)];
    dog.backgroundColor = [UIColor blackColor];
    dog.layer.cornerRadius = 4.0;
    dog.layer.masksToBounds = YES;
    dog.alpha = line.alpha;
    [self addSubview:dog];
}

@end
